<!-- thanh toolbar -->
<?php $this->placeholder('toolbar')->captureStart();?>
<?php echo $this->partial('index/toolbar/save-order.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/publish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/unpublish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / --> 

<form id='adminForm' name='adminForm' method='post' action=''>

	<!-- phần tìm kiếm -->
	<fieldset id='filter-bar' style='height: auto'>
		<?php echo $this->partial('index/search/layout.phtml', 'admin',array (  	
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->unit_code,'name'=>'unit_code')),
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->unit_name,'name'=>'unit_name')),
			 $this->partial('index/search/submit.phtml', 'admin') 
		 )); ?>
		<?php echo $this->partial('index/filter/layout.phtml', 'admin',array (		
			$this->partial('index/filter/publish.phtml', 'admin',array('name'=>'unit_status','value'=>$this->unit_status)) 
		 )); ?>		 
	</fieldset>	
	<!-- / -->
	
	<!-- danh sách hiển thị -->
	<div class='clr'> </div>
	<table class='adminlist'>
		<thead>			
			<tr>
				<?php echo $this->partial('index/manage/no-save-order.phtml', 'admin', array('column'=>'unit_order')); ?>
				<?php echo $this->partial('index/manage/checkbox-all.phtml', 'admin'); ?>				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'unit_code')); ?>
				</th>
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'unit_name')); ?>
				</th>
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'unit_note')); ?>
				</th>
				
				<th width='80px'>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'unit_status')); ?>
				</th>
				<th width='80px'>
					Quản lý
				</th>
			</tr>
		</thead>
		<tbody>
		<?php if (count($this->paginator) > 0): $no=0;?>
		<?php foreach ($this->paginator as $row): ?>
			<tr class='row<?php echo ($no++)%2 ?>'>
				<?php echo $this->partial('index/manage/order.phtml', 'admin', array($no)) ?>
				<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->unit_id)) ?>
				<td class="is_code">
					<?php echo $row->unit_code ?>
				</td>
				<td>
					<?php echo $row->unit_name ?>
				</td>
				<td class='left'>
					<?php echo $row->unit_note; ?>
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/publish.phtml','admin', array($this->url(array('action' => 'publish')),$row->unit_status)); ?>	
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/detail.phtml','admin', array($this->url(array('action' => 'detail','id'=>$row->unit_id)))); ?>
					<?php echo $this->partial('index/manage/edit.phtml','admin', array($this->url(array('action' => 'update','id'=>$row->unit_id)))); ?>
					<?php echo $this->partial('index/manage/trash.phtml','admin', array($this->url(array('action' => 'delete')))); ?>	
				</td>
			</tr>
		<?php endforeach; ?>
		<?php endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan='7'>
					<div class='container'>
						<?php echo $this->paginationControl($this->paginator) ?>
					</div>
				</td>
			</tr>
		</tfoot>
	</table>
	<!-- / -->
	
</form>
